﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Expression;
using Castle.ActiveRecord;

namespace Mang24k99.Model.COMM
{
    [ActiveRecord(Table = "KT_COMM_ORGLIST_History")]
    public partial class MKtCommOrglistHistory : ActiveRecordBase
    {


        private int _ID;

        private int? _OrgnizeNO;

        private string _OrgnizeName;

        private string _OrgnizeAlias;

        private int? _ParentNO;

        private string _ChineseSpell;

        private string _CompsiteNO;

        private int? _LevelOrder;

        private int? _OrangeLayer;

        private Byte[] _LOGO;

        private string _LogoPath;

        private int? _IsValidate;

        private DateTime? _InputTime;

        private DateTime? _ModifyTime;

        private DateTime? _DeleteTime;
        private int? _IsGrant;

        private int? _IsColumn;

        /// <summary>
        /// Gets or sets the ID.()
        /// </summary>
        /// <value>The ID.</value>
        [PrimaryKey(PrimaryKeyType.Native, "ID")]
        public int ID
        {
            get
            {
                return _ID;
            }
            set
            {
                _ID = value;
            }
        }


        /// <summary>
        /// Gets or sets the OrgnizeNO.()
        /// </summary>
        /// <value>The OrgnizeNO.</value>
        [Property("ORGNIZE_NO")]
        public int? OrgnizeNO
        {
            get
            {
                return _OrgnizeNO;
            }
            set
            {
                _OrgnizeNO = value;
            }
        }


        /// <summary>
        /// Gets or sets the OrgnizeName.()
        /// </summary>
        /// <value>The OrgnizeName.</value>
        [Property("ORGNIZE_NAME")]
        public string OrgnizeName
        {
            get
            {
                return _OrgnizeName;
            }
            set
            {
                _OrgnizeName = value;
            }
        }


        /// <summary>
        /// Gets or sets the OrgnizeAlias.()
        /// </summary>
        /// <value>The OrgnizeAlias.</value>
        [Property("ORGNIZE_ALIAS")]
        public string OrgnizeAlias
        {
            get
            {
                return _OrgnizeAlias;
            }
            set
            {
                _OrgnizeAlias = value;
            }
        }


        /// <summary>
        /// Gets or sets the ParentNO.()
        /// </summary>
        /// <value>The ParentNO.</value>
        [Property("PARENT_NO")]
        public int? ParentNO
        {
            get
            {
                return _ParentNO;
            }
            set
            {
                _ParentNO = value;
            }
        }


        /// <summary>
        /// Gets or sets the ChineseSpell.()
        /// </summary>
        /// <value>The ChineseSpell.</value>
        [Property("CHINESE_SPELL")]
        public string ChineseSpell
        {
            get
            {
                return _ChineseSpell;
            }
            set
            {
                _ChineseSpell = value;
            }
        }


        /// <summary>
        /// Gets or sets the CompsiteNO.()
        /// </summary>
        /// <value>The CompsiteNO.</value>
        [Property("COMPSITE_NO")]
        public string CompsiteNO
        {
            get
            {
                return _CompsiteNO;
            }
            set
            {
                _CompsiteNO = value;
            }
        }


        /// <summary>
        /// Gets or sets the LevelOrder.()
        /// </summary>
        /// <value>The LevelOrder.</value>
        [Property("LEVEL_ORDER")]
        public int? LevelOrder
        {
            get
            {
                return _LevelOrder;
            }
            set
            {
                _LevelOrder = value;
            }
        }


        /// <summary>
        /// Gets or sets the OrangeLayer.()
        /// </summary>
        /// <value>The OrangeLayer.</value>
        [Property("ORANGE_LAYER")]
        public int? OrangeLayer
        {
            get
            {
                return _OrangeLayer;
            }
            set
            {
                _OrangeLayer = value;
            }
        }


        /// <summary>
        /// Gets or sets the LOGO.()
        /// </summary>
        /// <value>The LOGO.</value>
        [Property("LOGO")]
        public Byte[] LOGO
        {
            get
            {
                return _LOGO;
            }
            set
            {
                _LOGO = value;
            }
        }


        /// <summary>
        /// Gets or sets the LogoPath.()
        /// </summary>
        /// <value>The LogoPath.</value>
        [Property("LOGO_PATH")]
        public string LogoPath
        {
            get
            {
                return _LogoPath;
            }
            set
            {
                _LogoPath = value;
            }
        }


        /// <summary>
        /// Gets or sets the IsValidate.()
        /// </summary>
        /// <value>The IsValidate.</value>
        [Property("IS_VALIDATE")]
        public int? IsValidate
        {
            get
            {
                return _IsValidate;
            }
            set
            {
                _IsValidate = value;
            }
        }


        /// <summary>
        /// Gets or sets the InputTime.()
        /// </summary>
        /// <value>The InputTime.</value>
        [Property("INPUT_TIME")]
        public DateTime? InputTime
        {
            get
            {
                return _InputTime;
            }
            set
            {
                _InputTime = value;
            }
        }


        /// <summary>
        /// Gets or sets the ModifyTime.()
        /// </summary>
        /// <value>The ModifyTime.</value>
        [Property("MODIFY_TIME")]
        public DateTime? ModifyTime
        {
            get
            {
                return _ModifyTime;
            }
            set
            {
                _ModifyTime = value;
            }
        }


        /// <summary>
        /// Gets or sets the DeleteTime.()
        /// </summary>
        /// <value>The DeleteTime.</value>
        [Property("DELETE_TIME")]
        public DateTime? DeleteTime
        {
            get
            {
                return _DeleteTime;
            }
            set
            {
                _DeleteTime = value;
            }
        }

        /// <summary>
        /// Gets or sets the IsGrant.(1：是授权机构，在权限管理出现（默认）
        //0：是非授权机构，在权限管理中不出现
        //)
        /// </summary>
        /// <value>The IsGrant.</value>
        [Property("IS_GRANT")]
        public int? IsGrant
        {
            get
            {
                return _IsGrant;
            }
            set
            {
                _IsGrant = value;
            }
        }


        /// <summary>
        /// Gets or sets the IsColumn.(1：是栏目机构，在栏目管理中出现（默认）
        ///0：是非栏目机构，在栏目管理中不出现
        ///)
        /// </summary>
        /// <value>The IsColumn.</value>
        [Property("IS_COLUMN")]
        public int? IsColumn
        {
            get
            {
                return _IsColumn;
            }
            set
            {
                _IsColumn = value;
            }
        }





        public static IList<MKtCommOrglistHistory> SelectAll()
        {
            return (IList<MKtCommOrglistHistory>)FindAll(typeof(MKtCommOrglistHistory));
        }
        public static MKtCommOrglistHistory SelectByPrimaryKey(object ID)
        {
            return (MKtCommOrglistHistory)FindByPrimaryKey(typeof(MKtCommOrglistHistory), ID);
        }
        public static IList<MKtCommOrglistHistory> SelectALLByProperty(string property, object value)
        {
            return (IList<MKtCommOrglistHistory>)FindAllByProperty(typeof(MKtCommOrglistHistory), property, value);
        }
        public static IList<MKtCommOrglistHistory> SelectALLSliced(int firstResult, int maxResult, NHibernate.Expression.DetachedCriteria criteria)
        {

            return (IList<MKtCommOrglistHistory>)SlicedFindAll(typeof(MKtCommOrglistHistory), firstResult, maxResult, criteria);
        }

    }
}
